package org.example.chat.entity;

import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * @author cheval
 */
@Data
@Entity
@Table(name = "friend_request")
public class FriendRequest {
    @Id
    @Column(name = "id")
    private String id;

    @Column(name = "request_user_id", length = 64, nullable = false)
    @Comment("发送者id")
    private String requestUserId;

    @Column(name = "accept_user_id", length = 64, nullable = false)
    @Comment("接受者id")
    private String acceptUserId;

    @Column(name = "status", nullable = false)
    @Comment("添加状态， 0: 等待通过 1: 已添加 2: 已拒绝  3: 已过期")
    private Integer status;

    @Column(name = "request_date_time", nullable = false)
    @Comment("请求时间")
    private LocalDateTime requestDatetime;
}
